Re: [SQL] Time related question... - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] Time related question...
Date
Msg-id l03110707b1ad7204baf8@[147.233.159.109]
Whole thread Raw
In response to Re: [SQL] Time related question...  (Patrice Hédé <patrice@idf.net>)
List pgsql-sql
At 15:45 +0300 on 17/6/98, Patrice Hédé wrote:


> with datetime, it could be then :
>
> select * from servicecall whre (dateclosed - dateentered) < '3 days';
>
> However, if you really need abstime, I don't know the answer.

Actually, all that needs be done is to cast the abstime as datetime. Such as:

SELECT *
FROM servicecall
WHERE ( datetime( dateclosed ) - datetime( dateentered ) ) < '3 days';

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-sql by date:

Previous
From: "Jose' Soares Da Silva"
Date:
Subject: Re: [SQL] cast text as date
Next
From: Patrice Hédé
Date:
Subject: Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)